const https = require('https');
const cheerio = require('cheerio');
https.get('https://www.tupianzj.com/meinv/mm/meituwang/', (res) => {
  
  res.setEncoding('utf8');
  let rawData = '';
  let num = 0;
  let imgArr = [];
  res.on('data', (chunk) => { 
    rawData += chunk;
   });
  res.on('end', () => {
   
    const $ = cheerio.load(rawData);
    $('img').each((i, el)=>{
      imgArr.push($(el).attr('src'))
    })
    console.log(imgArr);
    /* 
    得到 图片 地址
    */
  });
}).on('error', (e) => {
  console.error(`出现错误: ${e.message}`);
});